home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / os2 / srefv12i.zip / aliases.in < prev    next >
Text File  |  1997-02-28  |  7KB  |  158 lines

  1. ; This contains the SRE-FILTER sample alias file. 2/97
  2. ;
  3. ; I) Introduction:
  4. ;
  5. ;  Aliases are used to modify and transform the request selector.
  6. ;
  7. ;  There are several reaons for wanting to do this:
  8. ;     Local redirection: Substituting for common "misspellings and abbreviations"
  9. ;     Implementing searchable indices.
  10. ;     Remote redirection: Redirecting requests for moved URLS
  11. ;     (SEMI-OBSOLETE) Setting path for CGI-BIN scripts
  12. ;     (SEMI-OBSOLETE) Transferring non-data-directory files.
  13. ;
  14. ; 2) Structure of entries
  15. ;
  16. ; Each line is structured as:
  17. ;     host_nickname//  TARGET  REPLACEMENT
  18. ; where host_nickname// is optional.
  19. ; Spaces should seperate these items.  
  20. ; The TARGET should  have NO embedded spaes.
  21. ; Note that in the TARGET, we convert / to \, and drop any leading / (or \).
  22. ;
  23. ;  *Special feature: if a line ends with a ' ,' (a space, then a comma)
  24. ;        the next line is treated as a continuation (with intervening spaces
  25. ;        removed).
  26. ;
  27. ;  SRE-FILTER attempts to (exact or wildcard) match the request selector
  28. ;  with each TARGET.   
  29. ;
  30. ; 3) Notes:
  31. ;
  32. ;  *     Definition of "request selector:"
  33. ;           The "request selector" is the slightly modified middle portion of
  34. ;           the request string sent by a client to a server.
  35. ;           For example, a URL of
  36. ;                 http://your.server/big/dance/price.htm
  37. ;           would generate a request string of
  38. ;                 GET  /big/dance/price.htm  HTTP/1.0
  39. ;           and the selector would be
  40. ;                big/dance/price.htm
  41.  
  42. ;
  43. ;  *  If a host_nickname appears, that the entry is only
  44. ;     used for "Hosts" that have been assigned this host_nickname.
  45. ;
  46. ;  *  If a match is found, the request selector is replaced by the
  47. ;     REPLACEMENT, with possible "wildcard substitution".
  48. ;
  49. ;  *  "Wildcard substitution" occurs only if a * appears in the REPLACEMENT
  50. ;     and in the TARGET.  When this occurs, and the request selector  "wildcard"
  51. ;     matches the TARGET, a textual substitution will occur in the REPLACEMENT.
  52. ;     Specifically, the * in the REPLACEMENT will be removed, and
  53. ;     the portion of the request selector "covered" by the * (in the
  54. ;     TARGET) will be inserted in it's place.
  55. ;     Examples, given:
  56. ;          Request selector: /CATS/A14.HTM
  57. ;              an an alias entry with
  58. ;          Target:  /CATS/*
  59. ;          Replacement: /SHOP1/PETS/FELINES/PUREBRED/*
  60. ;        will yield:
  61. ;                  /SHOP1/PETS/FELINES/PUREBRED/A14.HTM
  62. ;        Note that the A14.HTM in the request selector is "covered"
  63. ;        by the * in the TARGET.
  64. ;
  65. ; 4) Some Examples   -------------------
  66. ;
  67. ; i) Local redirection: Replace a "misspelling or abbreviation" with a selector
  68. ;      INDEX INDEX.HTM
  69. ;
  70. ; ii) Implementing searchable indices (using SRE-FILTER's DOSEARCH utility)
  71. ;    In this example, CONGRESS.DAT will be searched using the search
  72. ;    list returned by the client
  73. ;       TESTSRCH.HTM?* DOSEARCH?file=/congress.dat&searchfor=*&delim=$
  74. ;    If ROOTC/ is a virtual directory for  C:\USERS\, this will search
  75. ;    C:\USERS\JOES.LST
  76. ;       LOOKUSER.HTM?* dosearch?file=/ROOTC/JOES.LST&searchfor=*&delim=0
  77. ;
  78. ; iii) The next 4 examples perform  "remote" redirectons.
  79. ;   a) This (note use of a full URL, including the http://)
  80. ;      causes a "temporary move"  (http status code 302) redirection.
  81. ;         YAH* http://www.yahoo.com/
  82. ;   b)Specifies the same thing, but the URL that follows
  83. ;      need not be comletely specified (if the ip domain is left out, it is
  84. ;      assumed to be to be back to your server.) Of course, to be safe one
  85. ;      should always specify the full URL (complete with http://)
  86. ;           WAH* !TEMP=www.yahoo.com/
  87. ;   c) A "permanent" move (http code 301) otherwise it's the same as
  88. ;        example ii.
  89. ;           ZAH* !MOVED=http://www.yahoo.com/
  90. ;   d) A "notification of moved resource" -- client recieves a document
  91. ;         telling her the resource has been moved, with a link to it's new
  92. ;         location
  93. ;           JOEDIR/CV.HTM  !NOTIFY  http://college.faraway.edu/FAC/JOE/CV.HTM
  94. ;
  95. ; iv) Specifying location of CGI-BIN script.
  96. ;     This instructs SRE-FILTER to look for SCRIPT10 in d:\PROGS\NEW
  97. ;     (rather the the default, "cgi_bin_dir", script directory)
  98. ;           SCRIPT10   d:\progs\new
  99. ;
  100. ; v) A host specific entry (only applies to requests to
  101. ;     hosts with a nickname of ZOO)
  102. ;     ZOO//  TIGERS    ANIMALS/FELINES/TIGERS.HTM
  103. ;
  104. ; vi) Transfering files from anywhere (OBSOLETE-- we recommend use of
  105. ;    virtual directories instead).
  106. ;        GETMAP?* !TRANSFER=e:\MAPS\*
  107. ;    Note that this assumes that 1 argument is appended to the selector (say by
  108. ;    a FORM of type GET)
  109. ;
  110. ; 5) More NOTES  --------------------
  111. ;
  112. ; * Note on match precedence:
  113. ;   If several entries can match the selector...
  114. ;     1) Exact matches take precedence
  115. ;     2) The wildcard match with the "longest portion before the *"
  116. ;        is used.
  117. ;     3) In case of ties, the match with the "longest portion after 
  118. ;         the *" is used.
  119. ;     Thus, if your selector is FOOD/FRUIT/ORANGES.HTM
  120. ;     then the order (with first being chosen before last) is:
  121. ;               FOOD/FRUIT/ORANGES.HTM  (the exact match)
  122. ;               FOOD/FRUIT/*
  123. ;               FOOD/*.HTM          (more characters after the *)
  124. ;               FOOD/*
  125. ;     (these 4 entries can appear in any order in this file, with no
  126. ;      effect on precedence).
  127. ;
  128. ; * A CAUTION  regarding unwanted aliasing:
  129. ;          Unless you explicitly want to "alias" actual files, directories,
  130. ;          or "server side program" names...
  131. ;                 we HIGHLY RECOMMEND that all entries in this file
  132. ;                    have "targets" that do NOT MATCH pre-existing files,
  133. ;                              directories, or "actions".
  134. ;         {and be especially careful if you are using any wildcard matches)
  135. ;
  136. ; * A CAUTION on local redirection and partial urls:
  137. ;      When using aliases for "local redirection", URL resolution by the
  138. ;      client's browser may have unexpected consequences. See the discussion 
  139. ;      of "local  vs remote redirection" in INITFILT.DOC for details!
  140. ;
  141. ;
  142. ; ---- - - --------  End of discussion --- - - - - - -- - -
  143. SAMPLES/TESTSRCH.HTM?* DOSEARCH?file=samples/congress.dat&delim=$&search=*
  144. INDEX INDEX.HTM
  145. CONFIGURE  /configur.htm
  146. FILTINST* CONFIG2*
  147. ; note use of , to signal continuation lines
  148. ;public getafile?dir=pubfiles/&showsize=yes&showdate=yes& ,
  149. ;showdir=yes&rootdir=pubfiles/&dispfile=read.me+Description+of+files& ,
  150. ;table=key&usedl=YES&tablefile=files.key+file+descriptions
  151. public !dir?pubfiles/
  152. !dir/* !dir?/*
  153. !viewmess* viewmess*
  154. !askmessbox* askmessbox*
  155. ; these next two are used by the SRE-FIlter's BBS add-on.
  156. bbs/download/*  bbs?download=*
  157. bbs/zipdownload/*  bbs?zipdownload=*
  158.